
import 'package:kq_flutter_tv_widgets/theme/configs/pullDown/kq_pullDown_theme_config.dart';

import '../default/kq_default_config_utils.dart';
import 'button/kq_button_theme_config.dart';
import 'common/kq_common_theme_config.dart';
import 'dialog/kq_dialog_theme_config.dart';
import 'form/kq_form_theme_config.dart';

/// 主题配置类
class KqThemeConfig {
  final KqCommonThemeConfig? _commonThemeConfig;
  final KqFormThemeConfig? _formThemeConfig;
  final KqDialogThemeConfig? _dialogThemeConfig;
  final KqButtonThemeConfig? _buttonThemeConfig;
  final KqPullDownMenuThemeConfig? _pullDownMenuThemeConfig;

  KqThemeConfig(
      {KqCommonThemeConfig? commonThemeConfig,
      KqFormThemeConfig? formConfig,
      KqDialogThemeConfig? dialogConfig,
      KqButtonThemeConfig? buttonThemeConfig,
      KqPullDownMenuThemeConfig? pullDownMenuThemeConfig})
      : _formThemeConfig = formConfig,
        _commonThemeConfig = commonThemeConfig,
        _dialogThemeConfig = dialogConfig,
        _buttonThemeConfig = buttonThemeConfig,
        _pullDownMenuThemeConfig = pullDownMenuThemeConfig;

  /// 通用配置
  KqCommonThemeConfig get commonConfig =>
      _commonThemeConfig ?? KqDefaultConfigUtils.defaultCommonConfig;

  /// 表单配置
  KqFormThemeConfig get formConfig =>
      _formThemeConfig ?? KqDefaultConfigUtils.defaultFormConfig;

  /// 对话框配置
  KqDialogThemeConfig get dialogConfig =>
      _dialogThemeConfig ?? KqDefaultConfigUtils.defaultDialogConfig;

  /// 按钮配置
  KqButtonThemeConfig get buttonThemeConfig =>
      _buttonThemeConfig ?? KqDefaultConfigUtils.defaultButtonConfig;

  /// 按钮配置
  KqPullDownMenuThemeConfig get pullDownMenuThemeConfig =>
      _pullDownMenuThemeConfig ?? KqDefaultConfigUtils.defaultPullDownMenuConfig;
}
